//
//  ViewController.m
//  RQActionSheet
//
//  Created by RocQ on 2017/6/5.
//  Copyright © 2017年 fengchao. All rights reserved.
//

#import "ViewController.h"
#import "RQActionSheet.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (IBAction)multipleClick {
    
    NSArray *items = @[@"第1行",@"第2行",@"第3行",@"第4行",@"第5行",@"第6行",@"第7行",@"第8行",@"第9行",@"第10行"];
     RQActionSheet *actionSheet = [[RQActionSheet alloc] initWithItems:items];
    actionSheet.isMultiple = YES;
    [actionSheet showWithMultipleSelectedCompletion:^(NSArray *indexPaths) {
    
         NSLog(@"多选 %@",indexPaths);

    }];
    
}

- (IBAction)singleClick {
    
    NSArray *items = @[@"第1行",@"第2行",@"第3行",@"第4行",@"第5行",@"第6行",@"第7行",@"第8行",@"第9行",@"第10行"];
    
    RQActionSheet *actionSheet = [[RQActionSheet alloc] initWithItems:items];
    [actionSheet showWithSelectedCompletion:^(NSInteger selectedIndex) {
        
        NSLog(@"==%@",items[selectedIndex]);
    }];
}

- (void)dealloc
{
    NSLog(@"销毁 %p",self);
}
@end
